package app

import (
	"github.com/gin-gonic/gin"
	"wx_build/core/msg"
	"wx_build/service"
)

type TaskApi struct {
}

func (TaskApi) List(g *gin.Context) {
	var dataService service.TaskService
	err := g.ShouldBindJSON(&dataService)
	if err != nil {
		msg.Error(g, err.Error(), err)
		return
	}
	if dataService.Page == 0 {
		dataService.Page = 1
	}
	if dataService.Size == 0 {
		dataService.Size = 10
	}
	dataService.List(g)
	return
}
